package com.zerone.dy.demomsg.mq;

import com.zerone.common.mq.annotation.MQ;
import com.zerone.common.mq.constant.MQConstant;
import com.zerone.common.mq.dto.MQMessage;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
@Slf4j
@RequiredArgsConstructor
public class MsgRabbitListener {



    @RabbitListener(bindings = {
            @QueueBinding(
                    value = @Queue(value = MQConstant.QR_MSG, durable = "true"),
                    exchange = @Exchange(value = MQConstant.EXCHANGE_SYSTEM),
                    key = MQConstant.QR_MSG
            )
    })
    @MQ
    public void handleDataChangeSys(MQMessage msg) {

    }




}
